package cn.edu.zxj.order.service.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * Created with IntelliJ IDEA.
 * Description：
 *
 * @author: zxj
 * @date: 2024-09-28
 * @time: 13:17:08
 */
@Configuration
public class BeanConfig {
    @Bean // 注入RestTemplate, 用于HTTP请求
    @LoadBalanced
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }
}
